package com.datechange.demo.controller;

import com.datechange.demo.entity.CmsAttachment;
import com.datechange.demo.service.CmsAttachmentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (CmsAttachment)表控制层
 *
 * @author makejava
 * @since 2020-12-14 15:46:51
 */
@RestController
@RequestMapping("cmsAttachment")
public class CmsAttachmentController {
    /**
     * 服务对象
     */
    @Resource
    private CmsAttachmentService cmsAttachmentService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public CmsAttachment selectOne(String id) {
        return this.cmsAttachmentService.queryById(id);
    }

}